package com.kmxd.ams.client.system.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.kmxd.ams.core.common.annotation.ExcelDict;
import com.kmxd.ams.core.excel.convert.ExcelDictConverter;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户表
 *
 * @author admin
 * @since 2022-03-24
 */
@Data
@ColumnWidth(15)
@HeadRowHeight(15)
@ContentRowHeight(15)
@HeadStyle
@HeadFontStyle(fontHeightInPoints = 12)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentFontStyle(fontHeightInPoints = 10)
@ExcelIgnoreUnannotated
public class SysUserListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  /** 主键 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /** 账号 */
  @ExcelProperty(value = "账号", index = 0)
  private String account;

  /** 密码 */
  @JsonIgnore private String password;

  /** 修改密码标记 0未修改；1已修改 */
  @JsonIgnore private String pswModified;

  /** 昵称 */
  @ExcelProperty(value = "昵称", index = 2)
  private String nickname;

  /** 姓名 */
  @ExcelProperty(value = "姓名", index = 4)
  private String realname;

  /** 英文名 */
  @ExcelProperty(value = "英文名", index = 5)
  private String englishName;

  /** 头像 */
  private String avatar;

  /** 邮箱 */
  @ExcelProperty(value = "邮箱", index = 6)
  private String email;

  /** 手机号 */
  @ExcelProperty(value = "手机号", index = 7)
  private String phone;

  /** 工号 */
  @ExcelProperty(value = "工号", index = 8)
  private String staffNumber;

  /** 生日 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "生日", index = 9)
  private Date birthday;

  /** 性别 1男；2女；3未知 */
  @ExcelProperty(value = "性别", index = 3, converter = ExcelDictConverter.class)
  @ExcelDict("sys_sex")
  private String sex;

  /** 部门ID */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long deptId;

  /** 锁定标记 0正常；1锁定 */
  @ExcelProperty(value = "锁定", index = 10, converter = ExcelDictConverter.class)
  @ExcelDict("sys_lock_flag")
  private String lockFlag;

  /** 排序 */
  @ExcelProperty(value = "排序", index = 11)
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer sort;

  /** 备注 */
  @ExcelProperty(value = "备注", index = 13)
  private String remarks;

  /** 状态 0正常；1停用 */
  @ExcelProperty(value = "状态", index = 12, converter = ExcelDictConverter.class)
  @ExcelDict("sys_status")
  private String status;

  /** 删除标记 0存在；1删除 */
  private String delFlag;

  /** 创建人 */
  private String createBy;

  /** 创建时间 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  /** 更新人 */
  private String updateBy;

  /** 更新时间 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  /** 部门名称 */
  @ExcelProperty(value = "部门", index = 1)
  private String deptName;

}
